﻿Namespace Global.Runa.UI.Threading

    Friend Class PriorityChain(Of T)

        Private _count As Integer
        Private _head As PriorityItem(Of T)
        Private _priority As DispatcherPriority
        Private _tail As PriorityItem(Of T)

        Public Sub New(ByVal priority As DispatcherPriority)
            Me._priority = priority
        End Sub

        Public Property Count As Integer
            Get
                Return Me._count
            End Get
            Set(ByVal value As Integer)
                Me._count = value
            End Set
        End Property

        Public Property Head As PriorityItem(Of T)
            Get
                Return Me._head
            End Get
            Set(ByVal value As PriorityItem(Of T))
                Me._head = value
            End Set
        End Property

        Public Property Priority As DispatcherPriority
            Get
                Return Me._priority
            End Get
            Set(ByVal value As DispatcherPriority)
                Me._priority = value
            End Set
        End Property

        Public Property Tail As PriorityItem(Of T)
            Get
                Return Me._tail
            End Get
            Set(ByVal value As PriorityItem(Of T))
                Me._tail = value
            End Set
        End Property

    End Class

End Namespace